﻿using System;
using System.Collections.Generic;
using System.Text;
using Motorbike.BLL.Service;
using Motorbike.BLL.Service.IMPL;

namespace Motorbike.BLL
{
    public class BllServiceFactory
    {
        private ISystemService _systemService;

        #region Single instance
        private static BllServiceFactory _instance;

        public static BllServiceFactory Instance
        {
            get 
            {
                if (null == _instance)
                {
                    lock (typeof(BllServiceFactory))
                    {
                        if (null == _instance)
                        {
                            _instance = new BllServiceFactory();
                        }
                    }
                }
                return _instance;
            }
        }
        #endregion

        private BllServiceFactory()
        {
            _systemService = new SystemServiceImpl();
        }

        public ISystemService SystemService
        {
            get { return _systemService; }
        }
    }
}
